package com.cskaoyan.controller;

import com.cskaoyan.service.SearchHistoryService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.SearchHistoryVo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SearchHistoryController {

    @Autowired
    SearchHistoryService searchHistoryService;

    /**
     * 功能:搜索历史页面
     * 作者:whj
     */
    @RequestMapping("admin/history/list")
    public BaseRespVo list(Integer page, Integer limit, Integer userId, String keyword, String sort, String order){
        SearchHistoryVo searchHistoryVo = searchHistoryService.query(page,limit,userId,keyword,sort,order);
        return BaseRespVo.ok(searchHistoryVo);
    }
}
